#ifndef finReadCsv_hh
#define finReadCsv_hh

//
// structure to store
// - time in pseudo-years
// - quotation of a financial product at that time
//
struct quote_s {
  float fTime;
  float quote;
  quote_s() {}
  ~quote_s() {}
  quote_s(float fTime_i, float quote_i) :
    fTime(fTime_i), quote(quote_i)
  {}
};

//
// structure to store
// - a pointer to an array of struct quote_s
// - information on the array size
// - how many array elements were filled
//
struct vquotes_s {
  quote_s* q;
  size_t maxSize;
  size_t size;

  vquotes_s() :
    q(0),
    maxSize(0),
    size(0)
  {}
  ~vquotes_s() {}

  vquotes_s(quote_s* q_i, size_t maxSize_i, size_t size_i=0) :
    q(q_i),
    maxSize(maxSize_i),
    size(size_i)
  {}
};

int readCsvQuotes(TString fname, vquotes_s& vquotes);


#endif
